<template>
        <div>
            <div class="pub-title">后台管理</div>
            <ul class="pub-tab">
                <li class="tab-block-list">
					<form action="">
						<div class="pub-form-line">
							<div class="pub-form-line-left sign">站点名称</div>
							<div class="pub-form-line-right">
								<input type="text" class="pub-input" v-model="info.sitename"/>
							</div>
						</div>
						<div class="pub-form-line">
							<div class="pub-form-line-left">关键字</div>
							<div class="pub-form-line-right">
								<input type="text" class="pub-input" v-model="info.key"/>
							</div>
						</div>
						<div class="pub-form-line">
							<div class="pub-form-line-left">站点描述</div>
							<div class="pub-form-line-right">
								<textarea style="width:500px;height:100px;" v-model="info.describe"></textarea>
							</div> 
						</div>
						<div class="pub-form-line">
							<div class="pub-form-line-left">联系方式</div>
							<div class="pub-form-line-right">
								<input type="text" class="pub-input" v-model="info.tel"/>
							</div>
						</div>
						<div class="pub-form-line">
							<div class="pub-form-line-left">备案信息</div>
							<div class="pub-form-line-right">
								<input type="text" class="pub-input" v-model="info.beianinfo"/>
							</div>
						</div>
						<div class="pub-form-line">
							<div class="pub-form-line-left"></div>
							<div class="pub-form-line-right">
								<button type="button" @click="submit" class="pub-btn pub-btn-bgred pub-btn-big">提交</button>
							</div>
						</div>
					</form>
                   
                </li>
            </ul>
        </div>
</template>
<script>
	module.exports={
		data:function(){
			return {
				info:{}				
			}
		},
		methods:{
			submit(){
				 ajax({
					url:"siteinfo/update",
					data:_this.info,
					type:'post',
					success:function(res){
						UI.alert(res.msg);
					}
				})
			}
		},
		created(){
			_this=this;
			ajax({
				url:"siteinfo/getinfo",
				success(res){
					if(res.state==1){
						_this.info=res.data.value;
					}else{
						UI.alert(res.msg,'',function(){},true);
					}
				}
			})
		}
	}
</script>